package com.suoluo.zenadmin.service.crawler.resolver;

import com.suoluo.zenadmin.service.crawler.bean.HotelReviewBean;



public final class CrawlerResolverFactory {

	private CrawlerResolverFactory(){
		
	}
	/**
	 * 
	 * @param reviewType
	 * @return
	 */
	public static CrawlerResolver createCrawlerResolver(CrawlerResovlerTask task){
		if (task.getReviewType() == HotelReviewBean.HotelReviewType.Tripadvisor.getValue()){
			return new TripadvisorCrawlerResolver(task);
		}else if (task.getReviewType() == HotelReviewBean.HotelReviewType.Hotels.getValue()){
			return new HotelsCrawlerResolver(task);
		}else if(task.getReviewType() == HotelReviewBean.HotelReviewType.Booking.getValue()){
			return new BookingCrawlerResolver(task);
		}else if (task.getReviewType() == HotelReviewBean.HotelReviewType.Daodao.getValue()){
			return new DaoDaoCrawlerResolver(task);
		}else{
			return null;
		}
	}
}
